<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<ul id="items">
    <li>若是没有华丽的翅膀</li>
    <li>要怎么穿行过跌宕</li>
    <li>若没有坚定的目光</li>
    <li>要怎么看得到远方</li>
    <li>挥别了太阳</li>
    <li>又迎来月亮</li>
    <li>此消彼长，丈量信仰</li>
</ul>
<body>
 <script>
     onload=()=>{
         let u1=document.querySelector('#items');
         let all=u1.querySelectorAll('li');
         for(let i=0,j=all.length;i<j;i++){
             all[i].onmouseover=()=>all[i].style['background-color']='red';
             all[i].onmouseout=()=>all[i].style['background-color']='';
         }
     }
 </script>
</body>
</html>